package com.ly.chatsimple

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.ly.chatsimple.ui.chat.ChatNav
import com.ly.chatsimple.ui.chat.ChatPage
import com.ly.chatsimple.ui.chat.MainPage
import com.ly.chatsimple.ui.theme.ChatSimpleTheme

class MainActivity : ComponentActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            ChatSimpleTheme {
                val navController = rememberNavController()
                NavHost(navController = navController, startDestination = ChatNav.MAIN) {
                    composable(ChatNav.MAIN) {
                        MainPage(navController = navController)
                    }

                    composable(ChatNav.CHAT) {
                        ChatPage(navController = navController)
                    }

                }
            }
        }
    }
}

